package com.zhijian.wharf.entity.vo.response;

import com.zhijian.wharf.enums.ThirdPartyDockingStatusEnum;
import com.zhijian.wharf.enums.UserStatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.web.bind.annotation.GetMapping;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * 第三方对接 回显vo
 *
 * @author auto
 * @version 1.0
 * @date 2024-07-07 13:34:55
 */
@Getter
@Api(tags = "第三方对接回显vo")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ThirdPartyDockingVo implements Serializable {

    private static final long serialVersionUID = -1;

    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    private Long id;

    /**
     * 单位名称
     */
    @ApiModelProperty("单位名称")
    private String name;

    /**
     * 联系电话
     */
    @ApiModelProperty("联系电话")
    private String phone;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String note;

    /**
     * 开始日期，格式'2023-11-11'
     */
    @ApiModelProperty("开始日期，格式'2023-11-11'")
    private String startTime;

    /**
     * 结束日期，格式'2023-11-11'
     */
    @ApiModelProperty("结束日期，格式'2023-11-11'")
    private String endTime;

    /**
     * appId
     */
    @ApiModelProperty("appId")
    private String appId;

    /**
     * appSecret
     */
    @ApiModelProperty("appSecret")
    private String appSecret;

    /**
     * 状态，0：待审核，1：已通过，2：已拒绝
     */
    @ApiModelProperty("状态，0：待审核，1：已通过，2：已拒绝")
    private Byte status;

    /**
     * 状态字符串
     */
    @ApiModelProperty("状态字符串")
    private String statusStr;

    /**
     * 授权功能枚举字符串，以英文逗号隔开
     */
    @ApiModelProperty("授权功能枚举字符串，以英文逗号隔开")
    private String modules;

    /**
     * 授权功能枚举数组
     */
    @ApiModelProperty("授权功能枚举数组")
    private List<Integer> moduleList;

    /**
     * 对应用户ID
     */
    @ApiModelProperty("对应用户ID")
    private Long userId;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private String updateTime;

    public void setId(Long id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public void setStatus(Byte status) {
        this.status = status;
        if (Objects.isNull(status)) {
            this.statusStr = null;
            return;
        }
        ThirdPartyDockingStatusEnum lineEnum = ThirdPartyDockingStatusEnum.getByCode(status.intValue());
        this.statusStr = Objects.nonNull(lineEnum) ? lineEnum.getDesc() : null;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public void setModules(String modules) {
        this.modules = modules;
    }

    public void setModuleList(List<Integer> moduleList) {
        this.moduleList = moduleList;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}